﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="window_articles.aspx.cs"
    Inherits="He.Web.manage.weixin.window_articles" %>

<%@ Register Src="../_uc/head_list.ascx" TagPrefix="uc" TagName="head_list" %>
<%@ Register Src="../_uc/head.ascx" TagPrefix="uc" TagName="head" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <uc:head runat="server" ID="uchead" />
    <uc:head_list runat="server" ID="uchead_list" />
    <script src="../../plug/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
    <script src="../../plug/artDialog/plugins/iframeTools.js" type="text/javascript"></script>
</head>
<body style="padding: 10px;">
    <form id="form1" runat="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <asp:DropDownList ID="ddlcategory_id" runat="server" CssClass="select" OnSelectedIndexChanged="ddlcategory_id_SelectedIndexChanged"
                    AutoPostBack="True">
                </asp:DropDownList>
                &nbsp;
                <asp:DropDownList ID="ddlProperty" runat="server" CssClass="select" OnSelectedIndexChanged="ddlProperty_SelectedIndexChanged"
                    AutoPostBack="True">
                    <asp:ListItem Value="">所有属性</asp:ListItem>
                    <asp:ListItem Value="isRed">推荐</asp:ListItem>
                    <asp:ListItem Value="isHot">热门</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td width="50" align="right">
                标题：
            </td>
            <td width="150">
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword"></asp:TextBox>
            </td>
            <td width="60" align="center">
                <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="submit" OnClick="btnSelect_Click" />
            </td>
        </tr>
    </table>
    <div class="spClear">
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <asp:Repeater ID="rptList" runat="server">
            <HeaderTemplate>
                <tr>
                    <th>
                        标题
                    </th>
                    <th>
                        所属类别
                    </th>
                    <th width="50">
                        操作
                    </th>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#Eval("title") %><asp:Label ID="lb_id" runat="server" Text='<%#Eval("id")%>' Visible="false"></asp:Label>
                    </td>
                    <td>
                        <%#GetCategorylTitle(Eval("category_id"))%>
                    </td>
                    <td>
                        <a href="javascript:void(0)" onclick="returnHomepage('<%=siteinfo.EnginePage %>?p=show&id=<%#Eval("id") %>',<%#Eval("Id") %>,'<%#Eval("title") %>','<%#Eval("img_url") %>')">选中</a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <div class="spClear">
    </div>
    <div style="line-height: 30px; height: 30px;">
        <%=He.Web.UI.HtmlHelper.PagerText(pcount, pageSize, page, "?"+CombUrlTxt(0,this.category_id, this.keywords, this.property)+"page=__id__&iskeyword="+Request["iskeyword"])%>
    </div>
    </form>
    <script>
        var iskeyword = <%=Request["iskeyword"] %>;
        var domid = art.dialog.data('domid');
        // 返回数据到主页面
        function returnHomepage(val,id,title,imgurl) {
            if (iskeyword == 1) {
                art.dialog.data("aid", id);
                art.dialog.data("atitle", title);
                art.dialog.data("imgurl", imgurl);
            }
            else {
                var origin = artDialog.open.origin;
                var dom = origin.document.getElementById(domid);
                dom.value = val;
            }
            setTimeout("art.dialog.close()", 100);
        }
</script>
</body>
</html>
